/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-06-27     AHTYDHD      the first version
 */

#include <rtthread.h>
#include <rtdevice.h>

#include "srv_control.h"
#include "master.h"

#include "button.h"
#include "beep.h"

int main(void)
{
    int count = 1;

    rt_pin_mode(2, PIN_MODE_OUTPUT);

    ist_beep_on(1, 500);
    ist_get_task_init();

    rt_sem_take(sw_1_sem, RT_WAITING_FOREVER);
    ist_master_start();
    while (count++)
    {
        rt_pin_write(2, PIN_HIGH);
        rt_thread_mdelay(500);
        rt_pin_write(2, PIN_LOW);
        rt_thread_mdelay(500);
    }

    return RT_EOK;
}
